package com.spring.common.web.model;

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

public class MyModel implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

//	@NotNull(message = "{user.id.null}")  
	@Pattern(regexp = "[a-zA-Z]{5,20}", message = "{user.name.illegal}")
    private String id;  
  
//    @NotEmpty(message = "{user.name.null}")  
//    @Length(min = 5, max = 20, message = "{user.name.length.illegal}")  
//    @Pattern(regexp = "[a-zA-Z]{5,20}", message = "{user.name.illegal}")  
    private String name;  
  
    @NotNull(message = "密码不可为空")  
    private String password;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
}
